<div class="table-responsive">
    <table class="list table table-bordered table-striped">
        <thead>
        <tr>
            <th>
                @component('backend::component.checkbox')
                    @slot('name') ids-all @endslot
                @endcomponent
            </th>
            <th><i class="hcl hcl-youjian mr-1"></i>留言标题</th><th>接受人</th><th>留言内容</th><th>留言时间</th><th>操作</th>
        </tr>
        </thead>
        <tbody>
        @foreach($list as $value)
            <tr>
                <td>
                    @component('backend::component.checkbox')
                        @slot('name') id[] @endslot
                        @slot('class') id @endslot
                        @slot('value') {{$value->id}} @endslot
                    @endcomponent
                </td>
                <td>
                    <i class="hcl {{$value->is_read < 2?'hcl-youjian':'hcl-msg-read'}} mr-1"></i>
                    {{$value->title}}
                </td>
                <td>

                    @if($value->toUser)
                        {{$value->toUser->user_number}}
                        [{{$value->toUser->real_name}}]
                    @else
                        自己
                    @endif
                </td>
                <td class="text-truncate" style="max-width: 8rem;">
                    <a href="{{route('b_Message_detail',['id'=>$value->id])}}" title="查看详情">{{$value->content}}</a>
                </td>
                <td>{{$value->created_at}}</td>
                <td>

                    @component('backend::component.form.button')
                        @slot('title') 删除 @endslot
                        @slot('icon') hcl-delete @endslot
                        @slot('color') danger @endslot
                    @endcomponent

                </td>
            </tr>
        @endforeach
        </tbody>
    </table>
</div>